<!--
 * @Descripttion: 
 * @Author: jiansheng
 * @Date: 2021-12-02 16:38:11
-->
<template>
  <div>
    <p style="margin: 30px;">provide组件：{{ fooString }} -- {{ fooObj }} -- {{ fooObj.foo }}</p>
    <child1></child1>
  </div>
</template>
<script>
import child1 from './components/child1'
export default {
  components: { child1 },
  provide() {
    return {
      fooString: this.fooString,
      fooObj: this.fooObj
    }
  },
  data() {
    return {
      fooString: '测试 foo string',
      fooObj: {
        foo: '12'
      }
    }
  }
  
}
</script>